package storage

import (
	"go-cmd/tinykv/proto/pkg"
	"go-cmd/tinykv/storage/utils"
)

type Storage interface {
	Start() error
	Stop() error
	Writer(ctx *pkg.Context, batch []Modify) error
	Reader(ctx *pkg.Context) (StorageReader, error)
}

type StorageReader interface {
	GetCF(cf string, key []byte) ([]byte, error)
	IterCF(cf string) utils.DBIterator
	Close()
}

type Modify struct {
	Data any
}